package com.sjc.geekDesignPattern.template.callback;


interface ICallback {
    void methodToCallback();
}

class BClass {
    public void process(ICallback callback) {
        //...
        callback.methodToCallback();
        //...
    }
}

public class AClass {
    public static void main(String[] args) {
        BClass bClass = new BClass();
        bClass.process(new ICallback() {
            @Override
            public void methodToCallback() {
                System.out.println(" callback me ");
            }
        });
    }
}
